package utils;


import obj.*;

import java.awt.*;
import java.util.ArrayList;
import java.util.List;

/**
 * 工具类
 */
public class GameUtils {

    //背景图片
    public static Image bgImg = Toolkit.getDefaultToolkit().getImage("game_code\\imgs\\bg.jpg");
    public static Image bg1Img = Toolkit.getDefaultToolkit().getImage("game_code\\imgs\\bg1.jpg");
    public static Image bossImg = Toolkit.getDefaultToolkit().getImage("game_code\\imgs\\boss.png");
    public static Image boss1Img = Toolkit.getDefaultToolkit().getImage("game_code\\imgs\\boss1.png");
    //我方战斗机图片
    public static Image palneImg = Toolkit.getDefaultToolkit().getImage("game_code\\imgs\\me1.png");
    //我方子弹图片
    public static Image shellImg = Toolkit.getDefaultToolkit().getImage("game_code\\imgs\\bullet2.png");
    //敌方子弹图片
    public static Image bulletImg = Toolkit.getDefaultToolkit().getImage("game_code\\imgs\\bullet1.png");
    //敌方战斗机图片
    public static Image enemtImg = Toolkit.getDefaultToolkit().getImage("game_code\\imgs\\enemy2.png");
    //我方飞机爆炸图片
    public static Image explode1Img = Toolkit.getDefaultToolkit().getImage("game_code\\imgs\\me_destroy_3.png");

    //所有游戏物体的集合
    public static List<GameObj> gameObjList = new ArrayList<>();

    //要删除元素的集合
    public static List<GameObj> removeList = new ArrayList<>();
    //我方子弹的集合
    public static List<ShellObj> shellObjList = new ArrayList<>();
    //敌方子弹的集合
    public static List<BulletObj> bulletObjList = new ArrayList<>();

    //敌方飞机的集合
    public static List<EnemyObj> enemyObjList = new ArrayList<>();
    //爆炸的集合
    public static List<ExplodeObj> explodeObjList = new ArrayList<>();

    //绘制字符串的工具类
    public static void drawWord(Graphics gImages,String str,Color color,int size,int x,int y) {
        gImages.setColor(color);
        gImages.setFont(new Font("仿宋",Font.BOLD,size));
        gImages.drawString(str,x,y);
    }
}
